﻿using AnesSystem.Models;
using AnesSystem.Services;
using AnesSystem.Udp;
using AnesSystem.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls
{
    /// <summary>
    /// ShouShuPaiTaiCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class SecheduleMainCtrl : UserControl
    {
        #region Variables

        #endregion

        #region Constructor

        public SecheduleMainCtrl()
        {
            InitializeComponent();
            this.DataContext = SecheduleMainCtrlViewModel.Instance;
            this.Loaded += SecheduleMainCtrl_Loaded;
        }

        #endregion

        #region Properties

        #endregion

        #region Event

        #endregion

        #region Private Methods
        private void getApply_Click(object sender, RoutedEventArgs e)
        {
            SecheduleMainCtrlViewModel.Instance.GetPatientLinksFromHIS();
        }

        #endregion

        #region Public/Protected Methods

        public void SetDataContext(object data)
        {
            this.DataContext = data;
        }

        #endregion

        #region EventHandlers

        private void SecheduleMainCtrl_Loaded(object sender, RoutedEventArgs e)
        {
            this.Ysxm.Text = "";
            SecheduleMainCtrlViewModel.Instance.Refresh();
        }


        #endregion

        private void refresh_Click(object sender, RoutedEventArgs e)
        {
            SecheduleMainCtrlViewModel.Instance.Refresh();
        }

    }
}
